package Card.game;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * keep Name of client.
 * 
 * @author Juthamas Utamaphethai 5510546964
 * @author Natcha Chidbhob 5510546026
 * 
 */
public class Name implements Serializable {
	/** name of client. */
	private String name;
	/** all name of client. */
	List<String> all = new ArrayList<String>();

	/**
	 * Constructor.
	 */
	public Name() {
	}

	/**
	 * give name of client.
	 * 
	 * @return name
	 */
	public String getName() {
		return name.toString();
	}

	/**
	 * set name of client.
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * add name to List.
	 */
	public void add() {
		all.add(name);
	}

	/**
	 * give all name of client.
	 * 
	 * @return all name that is a String[]
	 */
	public String[] getAll() {
		return all.toArray(new String[all.size()]);
	}
}
